#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    m_widget = new QWidget(this);
    m_widget->resize (this->width(), this->height());
    m_widget->move (0,0);
    m_widget->setStyleSheet("background-color:rgba(0, 0, 0,0.3);");
    m_widget->show();
    rollingCalendar.setParent(this);
    rollingCalendar.move(this->width() / 2 - rollingCalendar.width() / 2,this->height() / 2 - rollingCalendar.height() / 2);
    rollingCalendar.show();
    this->showMaximized();
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::resizeEvent(QResizeEvent *event)
{
    QMainWindow::resizeEvent(event);
    m_widget->resize (this->width(), this->height());
    rollingCalendar.move(this->width() / 2 - rollingCalendar.width() / 2,this->height() / 2 - rollingCalendar.height() / 2);
}

